package tju.mic.medicine.ws.repo;


import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import tju.mic.medicine.ws.models.Disease;
import tju.mic.medicine.ws.models.DiseaseList;

/**
 *
 * @author tjusnow
 */
public interface DiseaseRepository extends CrudRepository<Disease,Long>{

    @Query("select a from Disease a where a.diseaseType.depart.departId = ?1 ")
    public DiseaseList getListByDepart(Long departId);
    
   
}
